package com.example.springstudy.utils;

import com.alibaba.excel.EasyExcel;
import com.example.springstudy.base.BaseAnalysisEventListener;

import java.io.InputStream;

public class ExcelUtils {
    public static <T> String importExcel(InputStream is, Class clazz, BaseAnalysisEventListener<T> listener) {
        EasyExcel.read(is, clazz, listener).sheet().doRead();
        return listener.getMsg();
    }
}
